<?php
$title = '存取';
$this->headTitle($title);
?>
<h1><?php echo $this->escapeHtml($title . '管理'); ?></h1>
<hr>
<ul id="access" class="nav nav-tabs">
    <li class="">
        <a href="#" data-toggle="tab" id="index">所有流水</a>
    </li>
    <li class="">
        <a href="#" data-toggle="tab" id="withdraw">取款流水</a>
    </li>
    <li class="active">
        <a href="#" data-toggle="tab" id="deposit">存款流水</a>
    </li>
</ul>
<h3><?php echo $this->escapeHtml('存款流水'); ?></h3>
<hr>
<table class="table table-hover table-striped">
    <tr>
        <th>账户号</th>
        <th>存款时间</th>
        <th>金额</th>
    </tr>
    <?php foreach ($this->deposit as $key => $deposit) { ?>
        <tr>
            <td><?php echo $deposit['account_id']; ?></td>
            <td><?php echo $deposit['access_time']; ?></td>
            <td><?php echo abs($deposit['account']); ?></td>
        </tr>
    <?php } ?>
</table>
<script type="text/javascript">
    $("#index").click(function () {
        window.location.replace("<?php echo $this->url('access/default', array('controller' => 'access', 'action' => 'index'));?>");
    });
    $("#withdraw").click(function () {
        window.location.replace("<?php echo $this->url('access/default', array('controller' => 'access', 'action' => 'withdraw'));?>");
    });
    $("#deposit").click(function () {
        window.location.replace("<?php echo $this->url('access/default', array('controller' => 'access', 'action' => 'deposit'));?>");
    });
</script>